<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0001																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla security
defined('_JEXEC') or die;

## Import Joomla Data
JHtml::_('behavior.tooltip');
?>
<script>
	// COM_JOOSAM_UNLOCK_NEED
	Joomla.submitbutton = function(task){ if (task == 'request.edit'){ if (document.adminForm.boxchecked.value==2){ alert('You need to unlock the the settings first'); return false; } else{ document.adminForm.boxchecked.value==1; Joomla.submitform(task, document.getElementById('adminForm')); } } else{ Joomla.submitform(task, document.getElementById('adminForm')); } }
</script>

<script>
function samServerShow(){ document.getElementById('samrverh').setAttribute("style", "height:30px;line-height:30px;width:200px;margin:auto;font-size:20px;color:#c8c8c8;display:none;text-align:center;"); document.getElementById('samserverh').setAttribute("style", "width:230px;height:36px;overflow:hidden;margin:0;padding:5px;display:block;background:#00ffff;border-radius:5px;border:1px solid #003399;"); } function samServerHide(){ document.getElementById('samrverh').setAttribute("style", "height:30px;line-height:30px;width:200px;margin:auto;font-size:20px;color:#c8c8c8;display:block;text-align:center;"); document.getElementById('samserverh').setAttribute("style", "width:230px;height:36px;overflow:hidden;margin:0;padding:5px;display:none;background:#00ffff;border-radius:5px;border:1px solid #003399;"); }
</script>


<div style="background: rgba(000, 255, 255, 0.1); float:right; margin:-60px -11px 0 0; padding:0; width:230px; height:30px; border-radius:10px;">
	
	<div id="samrverh" onmouseover="samServerShow()" style="height:30px;line-height:30px;width:200px;margin:auto;font-size:20px;color:#c8c8c8;display:block;text-align:center;">»<?php echo JText::_('COM_JOOSAM_WARNING'); ?>«</div>
	<div style="display:none;" id="samserverh" onmouseout="setTimeout('samServerHide()',3000);">
		<span style="color:#ff0033;font-size:36px; font-weight:bold; float:left;">!</span>
		
		<p style="padding-left:4px; padding-top:2px; font-size:13px;"><?php echo JText::_('COM_JOOSAM_CONNECT_SAMDB'); ?></p>
	</div>
</div>

<!-- Start form -->
<form action="<?php echo JRoute::_('index.php?option=com_joosam&view=requests'); ?>" method="post" name="adminForm" id="adminForm">
	<fieldset class="jsamLegend">
		
		<legend><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_SETTINGS'); ?></legend>
		
		<p style="margin:0;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_SETTINGS_INTRO'); ?></p>
	</fieldset> <?php
	foreach($this->items as $i => $item): ?>
		<table class="adminlist" style="border:1px solid #ccc; width:450px; margin-right:20px; margin-left:30px; border-radius:7px; overflow:hidden;float:left;" class="jsamLegend">
			<thead>
				<tr>
					
					<th style="width:100px;"><?php echo JText::_('COM_JOOSAM_OPTION'); ?></th>
					
					<th><?php echo JText::_('COM_JOOSAM_CUR_SETTINGS'); ?></th>
				<tr>
			</thead>
			<tbody>
				<tr class="row1">
					
					<td colspan="2" style="text-align:center;font-weight:bold;"><?php echo JText::_('COM_JOOSAM_GLOBAL'); ?></td>
				</tr>
				<tr class="row0">
					
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_ALLOW_MSG'); ?>:</td>
					<td><?php
						if($item->reqmsg == 'true'){ echo JText::_('COM_JOOSAM_YES'); }
						else{ echo JText::_('COM_JOOSAM_NO'); } ?>
					</td>
				</tr>
				<tr class="row0">
					
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_SONGTYPE'); ?>:</td>
					
					<td><?php if($item->songtyp == 'S,I,P,J,A,N,V,X,C,?'){ echo JText::_('COM_JOOSAM_ALL'); }
						else{ echo $item->songtyp; } ?>
					</td>
				</tr>
				<tr class="row0">
					
					<td style="width:100px;"><?php echo JText::_('Into Text'); ?>:</td>
					
					<td><?php echo JText::_('Click edit to view this.'); ?>
					</td>
				</tr>
				<tr class="row1">
					
					<td colspan="2" style="text-align:center;font-weight:bold;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_CATVIEW'); ?></td>
				</tr>
				<tr class="row0">
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_DEFAULT'); ?>:</td>
					<td><?php
						if ($item->defcat != 'all' AND $item->defcat != 'none'){
							$expl = explode(',', $item->defcat);
							$impl = implode(', ', $expl);
							echo $impl;
						} else{ echo $item->defcat; } ?>
					</td>
				</tr>
				<tr class="row0">
					
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_WHIEVENT'); ?>:</td>
					<td><?php echo $item->evtcat; ?></td>
				</tr>
				<tr class="row1">
					
					<td colspan="2" style="text-align:center;font-weight:bold;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_COLORS'); ?></td>
				</tr>
				<tr class="row0">
					
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_BGCOLOR'); ?>:</td>
					<td  style="background:#<?php echo $item->colorc; ?>;"><?php echo '<span style="background:#FFFFFF;">&nbsp;&nbsp;#'.$item->colorc.'&nbsp;&nbsp;</span>'; ?></td>
				</tr>
				<tr class="row0">
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_ROWCOLOR'); ?> (1):</td>
					<td  style="background:#<?php echo $item->colora; ?>;"><?php echo '<span style="background:#FFFFFF;">&nbsp;&nbsp;#'.$item->colora.'&nbsp;&nbsp;</span>'; ?></td>
				</tr>
				<tr class="row0">
					<td style="width:100px;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_ROWCOLOR'); ?> (2):</td>
					<td  style="background:#<?php echo $item->colorb; ?>;"><?php echo '<span style="background:#FFFFFF;">&nbsp;&nbsp;#'.$item->colorb.'&nbsp;&nbsp;</span>'; ?></td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					
					<td colspan="2" style="margin:0;padding:0;"><?php echo JHtml::_('grid.id', $i, $item->id); echo JText::_('COM_JOOSAM_CHECK_FOR_UNLOCK'); ?></td>
				</tr>
			</tfoot>
		</table>
		<fieldset style="width:400px;" class="jsamLegend">
			<legend><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_CAT_OPTIONS_TITLE'); ?></legend>
			<table style="vertical-align:top;">
				<tr>
					
					<td style="font-weight:bold; width:70px; vertical-align:top;"><?php echo JText::_('COM_JOOSAM_DEFAULT'); ?>:</td>
					
					<td><p style="margin:0;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_CAT_OPTIONS_TEXT'); ?></p></td>
				</tr>
				<tr>
					
					<td style="font-weight:bold; width:70px; vertical-align:top;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_WHIEVENT'); ?>:</td>
					
					<td><p style="margin:0;"><?php echo JText::_('COM_JOOSAM_VIEW_REQUEST_CAT_OPTIONS_WEVT'); ?></p></td>
				</tr>
			</table>
		</fieldset>
		<div>
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="boxchecked" value="2" />
			<?php echo JHtml::_('form.token'); ?>
		</div>
	<?php endforeach; ?>
</form>
<div class="clr"></div>
<!-- If you have respect for scriptplanet.eu you don't delete the code below -->
<div class="spCopyFooter" style="padding:0;margin:0 auto;font-size:9px;width:220px;text-align:center;"><span>JooSam created by</span><a href="http://www.scriptplanet.eu">ScriptPlanet.eu</a><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"><img alt="Creative Commons Licentie" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/80x15.png" /></a></div>